package com.eventapp.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="groups")
@Access(AccessType.FIELD)
public class Group extends BaseObject implements Serializable
{
   /** Default value included to remove warning. Remove or modify at will. **/
   private static final long serialVersionUID = 1L;

   @Id
   @GeneratedValue
   private Long id;
   private String name;
   @OneToMany
   private List<User> members; 
   @ManyToOne
   @JoinColumn(name="ownerId")
   private User owner;
   

@Override
public boolean equals(Object o) {
	// TODO Auto-generated method stub
	return false;
}


public Long getId() {
	return id;
}

public List<User> getMembers() {
	return members;
}

public String getName() {
	return name;
}

public User getOwner() {
	return owner;
}

@Override
public int hashCode() {
	// TODO Auto-generated method stub
	return 0;
}

public void setId(Long id) {
	this.id = id;
}

public void setMembers(List<User> members) {
	this.members = members;
}

public void setName(String name) {
	this.name = name;
}

public void setOwner(User owner) {
	this.owner = owner;
}

@Override
public String toString() {
	// TODO Auto-generated method stub
	return null;
}
   
   
   
   
 
   
   
   
}